<!DOCTYPE html>
<html>
<head>
<link href='/stylesheets/style.css' media="screen" rel="stylesheet" type="text/css" />
<link href='/stylesheets/matrix_new.css' media="screen" rel="stylesheet" type="text/css" />
<link href='/stylesheets/colorbox.css' media="screen" rel="stylesheet" type="text/css" />
<link href='/stylesheets/gantt.css' media="screen" rel="stylesheet" type="text/css" />
<script src="/javascripts/jquery.min.js"></script>
<script src="/javascripts/jquery.colorbox.js"></script>
<script src="/javascripts/jquery.fn.gantt.js"></script>
<script>
$(function() {
	$('a.colorbox.cbGantt').colorbox({rel: 'box_gantt', overlayClose: true, escKey: true, arrowKey: false, loop: true, current: " [{current}/{total}] ", previous: " -右翻页->| ", next: " |<-左翻页- ", close: " [按Esc关闭] ", fixed: false});
	$('a.colorbox.cbTasklet').colorbox({rel: 'box_tasklet', overlayClose: true, escKey: true, arrowKey: false, loop: true, current: " [{current}/{total}] ", previous: " -右翻页->| ", next: " |<-左翻页- ", close: " [按Esc关闭] ", fixed: false, title: function(){
	    var url = $(this).attr('href');
	    return '<a href="' + url + '" target="_blank">新窗口打开</a>';
	}});
});
</script>

<title>Matrix</title>
</head>
<body>

	<!--header-->
	<div class="headerbox">
		<div class="header">
			<h1 class="logobox"><a href="<%=@matrix_root%>"><img width="202" height="42" src="/images/uimatrix.jpg" alt="Matrix" /></a></h1>
			<h2 class="page-title">Matrix</h2>
			<div class="user-box">
				<span class="username"><%=@current_user.link_tag(nil, :title => @current_user.name)%></span>
				<a class="exitpage" hidefocus="true" href="/user/logout">退出</a>
			</div>
		</div>
	</div>


	<!--page-content-->
	<div class="page-content clearfix">
		<!--con-left-->
		<div class="c-left fl">
			<dl class="menubox">
				<dt class="m-title"></dt>
				<dd><a id="MyView" class="c-selected" hidefocus="true" href="/myview/open">与我相关</a></dd>
			<% if @current_user.user_group.name == 'Administrators' %>
				<dd><a id="Kanban" hidefocus="true" href="/kanban">REVIEW</a></dd>
			<% end %>
			</dl>

			<dl class="menubox">
				<dt class="m-title">项目</dt>
				<dd><a id="Index" hidefocus="true" href="/tasklets">[ 总览 ]</a></dd>
			<% @projects.each do |project| %>
				<dd><a id="project_<%=project.id%>" hidefocus="true" href="<%=project.link%>"><%=project.name%></a></dd>
			<% end %>
			</dl>

			<dl class="menubox">
				<dt class="m-title">管理</dt>
				<dd><a id="current_setting" hidefocus="true" href="/matrix/config#current_settings">当前配置</a></dd>
				<dd><a id="user_groups" hidefocus="true" href="/matrix/config#user_groups">用户组</a></dd>
			</dl>

			<dl class="menubox">
				<dt class="m-title">外部链接</dt>
				<dd><a id="websites" hidefocus="true" href="/websites">常用网址</a></dd>
				<dd><a id="events" hidefocus="true" href="/events">事件</a></dd>
			</dl>
		</div>
		<!--con-right-->
		<div class="c-right fl">
<%= yield %>
		</div>
	</div>


	<!--footer-->
	<div class="site-footer">
		<div class="main">
			<ul class="link">
			<li><a href="https://github.com/Lax/matrix">DEV</a></li>
			<li><a href="http://uimatrix.herokuapp.com/">DEMO</a></li>
			</ul>
			<span class="copyright">
			<span title="<%=Socket.gethostname%>">Matrix &copy;2012</span>
			</span>
		</div>
		<div class="haoes">
			Using time effectively, not just efficiently
		</div>
	</div> 

	<script src="/javascripts/matrix.js"></script>
	<script type="text/javascript">
		Matrix.init();
		selectLeft('<%=@current_panel%>');
	</script>
</body>
</html>
